/****************************************Copyright (c)**************************************************
**                                         2016-03
**
**                                
**
**
**--------------File Info-------------------------------------------------------------------------------
** File name:		    ht6x1x_tmr.c
** Last modified Date:  2016-03-29
** Last Version:		v1.0
** Descriptions:		
**
**------------------------------------------------------------------------------------------------------
** Created by:			Evan Chen
** Created date:		2016-03-29
** Version:				v1.0
** Descriptions:		
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
********************************************************************************************************/

/* Includes ------------------------------------------------------------------*/
#include "ht6x1x_tmr.h"

void TMR_Enable(HT_TMR_TypeDef  *TMRx)
{
	TMRx->TMRCON |= CMPIE_PRDIE_EN;
}

void TMR_Disable(HT_TMR_TypeDef  *TMRx)
{
	TMRx->TMRCON = 0;
}

void TMR_EnableInterrupt(HT_TMR_TypeDef  *TMRx, TMR_Enable_TypeDef TMRx_Type)
{
	TMRx->TMRIF &= ~TMRx_Type;
	TMRx->TMRIE |= TMRx_Type;
}

void TMR_DisableInterrupt(HT_TMR_TypeDef  *TMRx, TMR_Enable_TypeDef TMRx_Type)
{
	TMRx->TMRIF &= ~TMRx_Type;
	TMRx->TMRIE &= ~TMRx_Type;
}

